package com.ibuonline.b2b.entity;

import java.io.Serializable;

public class PaidGoldBoothKeyword implements Serializable {

	private static final long serialVersionUID = -3429726881065786272L;

	//fields
	private java.lang.Integer boothId;
	private java.lang.Integer keywordId;
	private java.sql.Timestamp startDate;
	private java.sql.Timestamp endDate;
	private java.lang.Integer grade;

	//default constructor
	public PaidGoldBoothKeyword() {
	}

	//constructor with arguments
	public PaidGoldBoothKeyword(java.lang.Integer boothId, java.lang.Integer keywordId) {
		this.boothId = boothId;
		this.keywordId = keywordId;
	}

	//getter
	public java.lang.Integer getBoothId() {
		return boothId;
	}
	public java.lang.Integer getKeywordId() {
		return keywordId;
	}
	public java.sql.Timestamp getStartDate() {
		return startDate;
	}
	public java.sql.Timestamp getEndDate() {
		return endDate;
	}
	public java.lang.Integer getGrade() {
		return grade;
	}

	//setter
	public void setBoothId(java.lang.Integer boothId) {
		this.boothId = boothId;
	}
	public void setKeywordId(java.lang.Integer keywordId) {
		this.keywordId = keywordId;
	}
	public void setStartDate(java.sql.Timestamp startDate) {
		this.startDate = startDate;
	}
	public void setEndDate(java.sql.Timestamp endDate) {
		this.endDate = endDate;
	}
	public void setGrade(java.lang.Integer grade) {
		this.grade = grade;
	}

	//equals method
	public boolean equals(Object other) {
		if (this == other)
			return true;
		if (!(other instanceof PaidGoldBoothKeyword))
			return false;

		final PaidGoldBoothKeyword paidGoldBoothKeyword = (PaidGoldBoothKeyword)other;
		if (!this.boothId.equals(paidGoldBoothKeyword.getBoothId()) || 
			!this.keywordId.equals(paidGoldBoothKeyword.getKeywordId()))
			return false;

		return true;
	}

	//hashCode method
	public int hashCode() {
		StringBuffer keys = new StringBuffer();
		keys.append(boothId).append(",");
		keys.append(keywordId).append(",");
		if (keys.length() > 0)
			keys.deleteCharAt(keys.length() - 1);
		return keys.toString().hashCode();
	}

	//toString method
	public String toString() {
		return new StringBuilder("PaidGoldBoothKeyword[")
			.append("boothId=").append(boothId).append(", ")
			.append("keywordId=").append(keywordId).append(", ")
			.append("startDate=").append(startDate).append(", ")
			.append("endDate=").append(endDate).append(", ")
			.append("grade=").append(grade).append("]").toString();
	}
	
	///######################################
	private PaidKeywords keyword;

	public PaidKeywords getKeyword() {
		return keyword;
	}
	public void setKeyword(PaidKeywords keyword) {
		this.keyword = keyword;
	}
	
	
}